<template>
	<view class="content">
		<view style="height: 1rpx;"></view>
		<job-card v-for="(item,index) in collectionJobList" :key="index" :jobInfo="item"></job-card>
	</view>
</template>

<script>
	import jobCard from '@/components/jobCard.vue'
	export default {
		data() {
			return {
				collectionJobList:[]
			}
		},
		components:{
			jobCard
		},
		onShow() {
			this.getQuery()
		},
		methods: {
			getQuery() {
				this.$store.dispatch('initDic').then(()=>{
					this.$http.request({
						url:'/post/list',
						data:{
							"startPage": 0,
							"type": 4
						}
					}).then((result)=>{
						let res=result.data
						console.log('响应结果',res);
						this.collectionJobList = res.data.posts
					})
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.content{
		width: 100%;
		min-height: 100vh;
		padding-bottom: 1px;
		background-color: #F3F7F8;
	}
</style>
